#pragma once
#include <tchar.h>
#include <stdlib.h>
#include <string>
// #include <ms/tstring.h>

class cstr_camp2{
public:
	cstr_camp2(const char* p):str(p){}
	~cstr_camp2(){;}

	operator int()
	{
        return atoi(str);
	}
	operator unsigned int()
	{
        return atol(str);
	}
    operator long()
    {
        return atol(str);
    }
    operator std::string()
    {
        return str;
    }
    operator short()
    {
        return atoi(str);
    }
    operator unsigned short()
    {
        return atoi(str);
    }
    operator bool()
    {
        return !(0 == atoi(str));
    }
    operator double()
    {
        return atof(str);
    }
    static cstr_camp2 str_camp(const char* str)
    {
        return cstr_camp2(str);
    }
private:
    const char * str;
};

